package com.foreveross.mofang.datapersistence.application.impl;

import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.MessageListener;
import javax.jms.TextMessage;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * 结点数据接收监听
 * 
 * @author fb
 */
public class MessageReceiceListenerApplicationService implements MessageListener {
	
	private static final Logger logger = LoggerFactory.getLogger(MessageReceiceListenerApplicationService.class);

	
	public void onMessage(Message message) {
		TextMessage textMsg = (TextMessage) message;
		String msg = null;

		try {
			msg = textMsg.getText();
			
			logger.debug("消息内容是：{}", msg);
		} catch (JMSException e) {
			logger.error("MQ获取结点数据出错：{}", message, e);
		} 

	}

}
